package com.epam.Aquarium;

import com.epam.Accessories.*;

import java.util.ArrayList;
import java.util.List;

public abstract class Aquarium {

    public Aquarium(){

    }

    public Aquarium(double price, AquariumQuality quality){
        this.price = price;
        this.quality = quality ;
    }

    public enum AquariumQuality {HIGHT, MEDIUM, LOW}
    private double price;
    private AquariumQuality quality;
    private List<Accessories> accessorieses = new ArrayList<Accessories>();

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        if(price > 0){
            this.price = price;
        }
    }

    public AquariumQuality getQuality() {
        return quality;
    }

    public void setQuality(AquariumQuality quality) {
        this.quality = quality;
    }


    public void addAccesories(Accessories accessories) {

        accessorieses.add(accessories);

        setPrice(getPrice()+accessories.getPrice());
    }

    public void showAccesories(){
        System.out.println("Accesories in aquarium:");
        for (Accessories a : accessorieses){
            System.out.println(a.toString());
        }
    }
}
